<div bsModal #createOrEditModal="bs-modal" class="modal fade" tabindex="-1" role="dialog" aria-labelledby="createOrEditModal"
  aria-hidden="true" [config]="{backdrop: 'static'}">
  <div class="modal-dialog modal-lg">
    <div class="modal-content">
      <form *ngIf="active" #editForm="ngForm" novalidate (ngSubmit)="save()" autocomplete="off">
        <div class="modal-header">
          <h4 class="modal-title">
            <span>编辑材料</span>
          </h4>
          <button type="button" class="close" (click)="close()" [attr.aria-label]="l('Close')">
            <span aria-hidden="true">&times;</span>
          </button>
        </div>
        <div class="modal-body">

          <div class="row">
            <div class="col-md-6">
              <div class="form-group">
                <label for="taskCode">任务号</label>
                <input #taskCodeInput="ngModel" type="text" name="taskCode" class="form-control" [(ngModel)]="material.taskCode"
                  required>
                <validation-messages [formCtrl]="taskCodeInput"></validation-messages>
              </div>
            </div>
            <div class="col-md-6">
              <div class="form-group">
                <label for="drawingCode">图号</label>
                <input type="text" name="drawingCode" class="form-control" [(ngModel)]="material.drawingCode">
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-md-6">
              <div class="form-group">
                <label for="materialName">材料名</label>
                <input type="text" name="materialName" class="form-control" [(ngModel)]="material.materialName">
              </div>
            </div>
            <div class="col-md-6">
              <div class="form-group">
                <label for="invFurBatch">炉批号</label>
                <input type="text" name="invFurBatch" class="form-control" [(ngModel)]="material.invFurBatch">
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-md-6">
              <div class="form-group">
                <label for="hgz_zjd">质检单号</label>
                <input type="text" name="hgz_zjd" class="form-control" [(ngModel)]="material.hgz_zjd">
              </div>
            </div>
            <div class="col-md-6">
              <div class="form-group">
                <label for="invCode">物资编码</label>
                <input type="text" name="invCode" class="form-control" [(ngModel)]="material.invCode">
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-md-6">
              <div class="form-group">
                <label for="paiHao">牌号</label>
                <input type="text" name="paiHao" class="form-control" [(ngModel)]="material.paiHao">
              </div>
            </div>
            <div class="col-md-6">

              <div class="form-group">
                <label for="materialStatus">材料状态</label>
                <input type="text" name="materialStatus" class="form-control" [(ngModel)]="material.materialStatus">
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-md-6">
              <div class="form-group">
                <label for="materialSpec">规格</label>
                <input type="text" name="materialSpec" class="form-control" [(ngModel)]="material.materialSpec">
              </div>
            </div>
            <div class="col-md-6">
              <div class="form-group">
                <label for="materialSize">尺寸</label>
                <input type="text" name="materialSize" class="form-control" [(ngModel)]="material.materialSize">
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-md-6">
              <div class="form-group">
                <label for="invMeasName">计量单位</label>
                <input type="text" name="invMeasName" class="form-control" [(ngModel)]="material.invMeasName">
              </div>
            </div>
            <div class="col-md-6">
              <div class="form-group">
                <label for="invDepMeasName">副计量单位</label>
                <input type="text" name="invDepMeasName" class="form-control" [(ngModel)]="material.invDepMeasName">
              </div>
            </div>
          </div>
          <div class="row">
            <div class="col-md-6">
              <div class="form-group">
                <label for="techCondition">技术状态</label>
                <input type="text" name="techCondition" class="form-control" [(ngModel)]="material.techCondition">
              </div>
            </div>
            <div class="col-md-6">
              <div class="form-group">
                <label for="zhuanYongInfo">专料专用信息</label>
                <input type="text" name="zhuanYongInfo" class="form-control" [(ngModel)]="material.zhuanYongInfo">
              </div>
            </div>
          </div>

          <div class="row">
            <div class="col-md-6">
              <div class="form-group">
                <label for="hgzNo">合格证</label>
                <input type="text" name="hgzNo" class="form-control" [(ngModel)]="material.hgzNo">
              </div>
            </div>
            <div class="col-md-6">
              <div class="form-group">
                <label for="baoGuanDate">保管期</label>
                <p-calendar [(ngModel)]="baoGuanDate" name="baoGuanDate" dateFormat="yy年m月d日" [locale]="primengCalendarHelper['zh-CN']" [utc]="'true'"
                [inputStyle]="{'width':'360px','height':'40px', 'padding-left':'20px'}" [inputStyleClass]="'form-control'"></p-calendar>
              </div>
            </div>
          </div>
          <div class="form-group">
            <label for="remark">备注</label>
            <textarea id="remark" class="form-control" type="text" name="remark" [(ngModel)]="material.remark" rows="3"></textarea>
          </div>
        </div>
        <div class="modal-footer">
          <button [disabled]="saving" type="button" class="btn btn-default" (click)="close()">{{l("Cancel")}}</button>
          <button type="submit" class="btn btn-primary" [disabled]="!editForm.form.valid" [buttonBusy]="saving"
            [busyText]="l('SavingWithThreeDot')"><i class="fa fa-save"></i> <span>{{l("Save")}}</span></button>
        </div>
      </form>
    </div>
  </div>
</div>
